Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

time: document auto-advancing behavior of runtime #3763

Merged
merged 3 commits into from
Jun 16, 2021

Conversation

eb-64-64
Copy link
Contributor

@eb-64-64 eb-64-64 commented May 7, 2021

Motivation

When there is no work for the runtime to do and the clock is paused, it is advanced to the closest timer. This can be confusing.

Solution

This PR documents that behavior.

When there is no work for the runtime to do and the clock is paused, it
is advanced to the closest timer. This can be confusing, so this commit
documents that behavior.
@Darksonn Darksonn requested a review from carllerche May 8, 2021 10:51
@Darksonn Darksonn added A-tokio Area: The main tokio crate M-time Module: tokio/time labels May 8, 2021
Copy link
Contributor

@Darksonn Darksonn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's no need to say "this can cause some confusion" in the documentation.

tokio/src/time/clock.rs Outdated Show resolved Hide resolved
tokio/src/time/clock.rs Outdated Show resolved Hide resolved
Co-authored-by: Alice Ryhl <alice@ryhl.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tokio Area: The main tokio crate M-time Module: tokio/time
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants